<template>
  <InfiniteLoading @loadMore="loadMoreData">
    <!-- 这里是你的内容 -->
    <YourContentComponent v-for="item in items" :key="item.id" />
  </InfiniteLoading>
</template>
 
<script>
import InfiniteLoading from './InfiniteLoading.vue';
import YourContentComponent from './YourContentComponent.vue';
 
export default {
  components: {
    InfiniteLoading,
    YourContentComponent
  },
  data() {
    return {
      items: []
    };
  },
  methods: {
    loadMoreData() {
      // 这里添加加载数据的逻辑
      this.getMoreData();
    },
    getMoreData() {
      // 假设有一个fetchData方法来获取数据
      fetchData().then(data => {
        this.items = [...this.items, ...data];
        this.isLoading = false;
      });
    }
  }
};
</script>